package bookshelf.client.book;

//import java.util.Date;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
//import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
//import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class BookDetail extends Composite {

	private BookController bc;

	private VerticalPanel main_panel = new VerticalPanel();
	
	private Button revise_button;

	public String key;

	private HorizontalPanel title_panel = new HorizontalPanel();
	private Label title_label = new Label("");
	
	private Label label_author = new Label("著者");
//	public Label label_author_furigana = new Label("著者（ふりがな）");
	public Label label_tranclator = new Label("訳者");
//	public Label label_tranc_frigana = new Label("訳者（ふりがな）");
	public Label label_series = new Label("シリーズ／文庫");
	private Label label_publisher = new Label("出版社");
	public Label label_category1 = new Label("カテゴリ１");
	public Label label_category2 = new Label("カテゴリ２");
	public Label label_release_date = new Label("出版日");
	public Label label_isbn = new Label("ISBN");
	public Label label_price = new Label("購入価格");

	private Label str_author = new Label();
//	public Label str_author_furigana = new Label();
	public Label str_tranclator = new Label();
//	public Label str_tranc_frigana = new Label();
	public Label str_series = new Label();
	private Label str_publisher = new Label();
	public Label str_category1 = new Label();
	public Label str_category2 = new Label();
	public Label str_release_date = new Label();
	public Label str_isbn = new Label();
	public Label str_price = new Label();

	
	public BookDetail() {
		
//		revise_button = new Button("修正する");
//		main_panel.add(revise_button);
		

		title_label.setText("カラマーゾフの兄弟");
		title_label.setStyleName("book-DetailTitle");
		title_panel.add(title_label);
		main_panel.add(title_panel);
		
		HorizontalPanel author_panel = new HorizontalPanel();
		author_panel.add(label_author);
		author_panel.add(str_author);
		main_panel.add(author_panel);
//		main_panel.add(label_author);
//		main_panel.add(str_author);
		
//		main_panel.add(label_author_furigana);
		main_panel.add(label_tranclator);
//		main_panel.add(label_tranc_frigana);
		main_panel.add(label_series);
		main_panel.add(label_publisher);
		main_panel.add(label_category1);
		main_panel.add(label_category2);
		main_panel.add(label_release_date);
		main_panel.add(label_isbn);
		main_panel.add(label_price);

		
		// initWidgetは絶対に必要なようだ。
		initWidget(main_panel);
	}
	
	public BookController getBookController() {
		return bc;
	}

	public void setBookController(BookController bc) {
		this.bc = bc;
	}

	public void setBookItem(BookItem bi){
		title_label.setText(bi.getTitle());
		str_author.setText(bi.getAuthor());
		
	}
}
